using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class so_itemtypeMap : EntityTypeConfiguration<so_itemtype>
    {
        public so_itemtypeMap()
        {
            // Primary Key
            this.HasKey(t => t.Item_Type);

            // Properties
            this.Property(t => t.Item_Type)
                .IsRequired()
                .HasMaxLength(25);

            // Table & Column Mappings
            this.ToTable("so_itemtype");
            this.Property(t => t.Item_Type).HasColumnName("Item_Type");
            this.Property(t => t.Count_).HasColumnName("Count_");
        }
    }
}
